﻿#region Copyright © 2009, DevExpressContrib (MIT License)
// This software is licensed under The MIT License:
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#endregion

namespace DevExpressContrib.Core.Interface
{
    using System.Windows.Forms;

    /// <summary>
    /// Interface for user defined information to be passed back to technical support. This allows
    /// the developer to inject a UserControl into the global exception dialog and process information
    /// from this user defined data.
    /// </summary>
    public interface IExceptionHandlerUserDefined
    {

        /// <summary>
        /// Gets the additional user defined data as a string. This will be placed at the
        /// beginning of the email message to technical support.
        /// </summary>
        /// <value>The data.</value>
        string Data { get; }

        /// <summary>
        /// Gets the text of the additional user defined data tab.
        /// </summary>
        /// <value>The tab text.</value>
        string TabText { get; }

        /// <summary>
        /// Gets the UserControl to inject into the global exception dialog. The user control
        /// will always be the second tab in the tab control.
        /// </summary>
        /// <value>The user interface.</value>
        UserControl UserInterface { get; }


        /// <summary>
        /// Finalizes the user interface. You may want to store information in a configuration file
        /// or other processing when the UserControl is going out of scope.
        /// </summary>
        void FinalizeUI();

        /// <summary>
        /// Initializes the user interface. You may want to read information from a configuration file
        /// or other processing when the UserControl is injected into the dialog.
        /// </summary>
        void InitializeUI();
    }
}
